package Fly.example.common;

/*
* 基于threadlocal封装的工具类，用于获取用户的id
* */
public class BaseContext {
    private static ThreadLocal<Long> threadLocal = new ThreadLocal<>();

    public static void setCurrentid(Long id) {
        threadLocal.set(id);
    }

    public static Long getCurrentid(){
        return threadLocal.get();
    }
}
